Skip to main content

All Questions

Tagged with
4votes
4answers
506views

Finding Special Parts in a Word

Task description: Imagine you have a long word made up of small letters like "a", "b", "c", ancd so on. Let’s call this word a puzzle word. We want to look at all the ...
CodeCrusader's user avatar
4votes
2answers
310views

A View over java.lang.String - improved take II

(This post elaborates on A string view over a Java String.) This time, I have incorporated both the great answers in the previous iteration: https://codereview.stackexchange.com/a/293506/58360 by ...
coderodde's user avatar
5votes
2answers
553views

A View over java.lang.String

(This post has continuation at A string view over a Java String - improved take II.) This time, I have a simple string view class for faster operation on substrings in actual string objects: ...
coderodde's user avatar
3votes
1answer
177views

Snail matrix in Java - version III (generalizing)

Once again, in the previous version, Alexander Ivanchenko helped me with his awesome answer. Now, I have improved the toString() and, also, generalized the class ...
coderodde's user avatar
4votes
2answers
128views

(Another) text formatting method with word wrapping in Java

Please take a look at my code for (simply) formatting/wrapping a text. Is there something to improve? Here are the properties the method should have: (updated) Every space character (i.e. ...
Tobias Grothe's user avatar
4votes
3answers
166views

Redouble each occurrence of char recursively, and add n

In following of this question, I would like to have a second review. The exercise is to write a recursive method that takes a String and a ...
Tobias Grothe's user avatar
4votes
1answer
276views

Print columns of text without hard coding the width (attempt 2)

If you'd like to print this: One Two Three Four 1 2 3 4 using this: ...
candied_orange's user avatar
3votes
1answer
126views

Print columns of text without hard coding the width

If you'd like to print this: One Two Three Four 1 2 3 4 using this: ...
candied_orange's user avatar
-2votes
1answer
402views

Number Plate Generation Program

I wrote a number plate generation program. The program generates number plates for a car registered with a specific Memory Tag and on a specific date. Number plates use the following format: (2 letter ...
kmvfkmfv's user avatar
1vote
3answers
87views

FileIO lines to String Converter

I think I made a good FileIO object because I can simply copy-paste whenever I need, however I wonder How I can improve my code. This code takes file path of the target file and turns every line to ...
ekan123's user avatar
2votes
1answer
190views

An evolutionary algorithm written in Java to crack an XOR cipher

Alright. So TryHackme is a website that tries to teach hacking with hands on labs. They have a room called JVM Reverse Engineering where the user gets to reverse engineer Java apps, and in particular ...
Aleksey's user avatar
4votes
2answers
1kviews

Add a number to a file name if does not exist or increase the number if it exist

I'm currently working on a solution to add a number to a file name if the number does not exist or increase de number by one if the number exist. For instance if you input "filename.jpeg" ...
Mario's user avatar
4votes
6answers
1kviews

Reverse string with identical spaces as in original String using Java

This is interview question Reverse string with identical spaces as in original String using Java For example Original String : best in the world and is greatest and is making sure the world goes well ...
Sreedhar Danturthi's user avatar
3votes
5answers
565views

Frame Strings that contain newlines

I have an application where I need to highlight some information that is printed to the console, so I wrote some static library methods which do that. I tested for bugs. Is my code clean and ...
Dexter Thorn's user avatar
2votes
1answer
132views

Related to DSA: Find longest common prefix

The objective of below code is find longest common prefix from trie DataStructure which is written in Java. Code: ...
RWLKfjs's user avatar

153050per page
close